package org.jeecg.modules.basic.print.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.basic.print.entity.PrintConfig;
import org.jeecg.modules.basic.print.service.IPrintConfigUtilService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
* @Description: 打印配置工具类
* @Author: jeecg-boot
* @Date:   2023-09-13
* @Version: V1.0
*/
@Api(tags="打印配置-复制配置")
@RestController
@RequestMapping("/copy/printConfig")
@Slf4j
public class PrintConfigUtilController {

   @Autowired
   private IPrintConfigUtilService printConfigUtilService;

   /**
    * 打印配置-复制配置功能
    *
    * @param copyId 复制的配置id
    * @param businessType 业务类型
    * @param documentType  单据类型
    * @return
    */
   @ApiOperation(value="打印配置-复制配置功能", notes="打印配置-复制配置功能\"")
   @GetMapping(value = "/excute")
   public Result<IPage<PrintConfig>> queryPageList(String copyId,String businessType,String documentType) {
      printConfigUtilService.copy(copyId,businessType,documentType);
       return Result.OK();
   }

}
